import request from '@/router/axios'

// 列表
export const list = (params) => {
  return request({
    url: '/yitu-portal-application/pageList',
    method: 'POST',
    params
  })
}

// 删除
export const del = (params) => {
  return request({
    url: '/yitu-portal-application/delete',
    method: 'POST',
    params
  })
}

// 新增
export const add = (params) => {
  return request({
    url: '/yitu-portal-application/add',
    method: 'POST',
    data: params
  })
}

// 编辑
export const update = (params) => {
  return request({
    url: '/yitu-portal-application/update',
    method: 'POST',
    data: params
  })
}

// 开启中的列表
export const upload = (params) => {
  return request({
    url: '/yitu-portal-attach/portalPutFileAttach',
    method: 'POST',
    data: params
  })
}

// 同步应用列表
export const applicaitonSync = () => {
  return request({
    url: '/yitu-portal-application/applicaitonSync',
    method: 'POST',
    data: {}
  })
}
// 入口列表
export const modulePageList = (data) => {
  return request({
    url: '/yt-portal-application-module-link/pageList',
    method: 'POST',
    data
  })
}

// 新增
export const moduleSaveOrUpdate = (data) => {
  return request({
    url: '/yt-portal-application-module-link/saveOrUpdate',
    method: 'POST',
    data
  })
}

// 根据id删除入口
export const moduleDeleteByIds = (data) => {
  return request({
    url: '/yt-portal-application-module-link/deleteByIds',
    method: 'POST',
    data
  })
}

// 详情
export const moduleDetail = (data) => {
  return request({
    url: '/yt-portal-application-module-link/detail',
    method: 'POST',
    data
  })
}

